package com.dycx.system.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单类型
 */
@Getter
@AllArgsConstructor
public enum AdminTypeEnum {

    GENERAL(0, "普通用户", "success"),
    SUPER_ADMIN(1, "超级管理员", "danger");

    private final Integer code;
    private final String name;
    private final String style;

    public static AdminTypeEnum getCode(Integer code) {
        for (AdminTypeEnum enums : AdminTypeEnum.values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }
}
